<?php
class Controller_AdminLogin extends Controller {

	function actionIndex(){
		$this->display('Login');
	}
	
	function actionIn(){
		$username = _gp("username","string");
		$password = _gp("password","string");
		
		$result = UAC::loginByUsername($username,$password);
		
		if( false == $result ){
			$this->assign("message",UAC::getMessage());
			$this->actionIndex();
		} else {
			$this->redirect(_url('AdminIndex'));
		}
	}
	
	function actionOut(){
		UAC::logout();
		$this->redirect($this->url(),"您已经登出系统...");
	}
	

}